const shell = require('shelljs')
const colors = require('colors-console')

const { name: distName } = require('../package.json')

console.log(colors('green', '开始打tar包'))

if (shell.exec(`cd ./dist && tar -zvcf ${distName}.tar.gz ./${distName}`).code !== 0) {
  shell.echo('Error: tar commit failed')
  shell.exit(1)
}

console.log(colors('green', '打tar包结束'))

